package cn.wit.Test;
/**
 * 计算一元二次方程组
 * @author 16604
 *
 */

public class TestEquation {
	public static void main(String[] args) {
		double a = 1;
		double b = 22;
		double c = 3;
		double x1;
		double x2;
		double temp;
		
		temp=Math.sqrt(Math.pow(b, 2)-4*a*c);
		//计算
		x1 = (-b+temp-4*a*c)/(2*a);
		x2 = (-b-temp)/(2*a);
		
		System.out.println(x1);
		System.out.println(x2);
	}

}
